using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
using NewsComponents;

namespace IReaper.RSS
{
    public class DataGridReadStateCell:DataGridViewImageCell
    {
        protected override object GetFormattedValue(object value, 
                                                int rowIndex, 
                                                ref DataGridViewCellStyle cellStyle,
                                                System.ComponentModel.TypeConverter valueTypeConverter, 
                                                System.ComponentModel.TypeConverter formattedValueTypeConverter,
                                                DataGridViewDataErrorContexts context)
        {
            bool canRead = (bool)value;
            if (canRead)
            {
                return RSSImageResources.Read;
            }
            else
            {
                return RSSImageResources.UnRead;
            }
        }
    }
}
